<div class="tab-pane active" id="conversion-1">
    <div class=" conver-wrap">
        <div class="row conver-detail">
            <?php
            if (!empty($dataByUsers)) {
                $counverUserId = '';
                foreach ($dataByUsers as $dataByUser) {
                    $counverUserId.=$dataByUser->users_id . ',';
                    $userDetails = Users::getFrontEndUser($dataByUser->users_id);
                    $imagePath = $dataByUser->users_id;
                    $imgsrc = ($userDetails->photo <> "") ? getRequestbaseUrl() . getuploadFolderDir() . $imagePath . '/profile/minithumb/' . $userDetails->photo : getWorkNoshopimage(SkillConfig::skill_myinbox_image);
                    ?>

                    <div class="col-lg-4 col-md-4 col-sm-4 column4">
                        <div class="checkbox choice">
                            <input type="checkbox"  class="selected_checkbox" id="check<?php echo $dataByUser->id; ?>" name="converted_users" checked="checked"  value="<?php echo $dataByUser->users_id; ?>" onclick="updateConvertedUserlist(this.id);"> 
                            <label for="check<?php echo $dataByUser->id; ?>">
                            </label>
                        </div>
                        <div class="imgname">
                            <img src="<?php echo $imgsrc; ?>" alt="">
                            <h3><?php echo ($userDetails->first_name != '') ? $userDetails->first_name . ' ' . $userDetails->last_name : substr($userDetails->user->username, 0, 10); ?></h3>

                        </div>
                    </div>
                    <?php
                }
                ?></div></div>
        <div class="query-reply">
            <input type="text" name="" id="subject_id"  value="" placeholder="Enter subject name...">
            <input type="hidden" id="get_converted_users" value="<?php echo $counverUserId; ?>">
            <textarea placeholder="write a reply..." class="form-control book-control" id="message_text_reply"></textarea>
            <input type="submit" value="submit" onclick="sendAMailToAllConvertedUser(<?php echo $dataByUser->classes_id; ?>, '<?php echo SkillConfig::class_name; ?>',<?php echo $dataByUser->id; ?>)"/>
             <div id="sendnotificationtouser" style="display: none"><img src="<?php echo ThemePath(); ?>/images/myskill.gif"></img></div><div id="error_message" class="errorMessage"></div> </div><?php
    } else {
        echo 'No User Converted.';
    }
    ?>
</div><!--tab pan1 for conversion ends-->  
<script>
                                function updateConvertedUserlist(id) {
                                    var allVals = [];
                                    if ($("#" + id).is(':checked')) {
                                        $('#get_converted_users').val('');
                                        $('#' + id).addClass('selected_checkbox');
                                        $('.selected_checkbox').each(function() {
                                            allVals.push($(this).val());
                                        });
                                        $('#get_converted_users').val(allVals);
                                    } else {
                                        $('#get_converted_users').val('');
                                        $('#' + id).removeClass('selected_checkbox');
                                        $('.selected_checkbox').each(function() {
                                            allVals.push($(this).val());
                                        });
                                        $('#get_converted_users').val(allVals);
                                    }
                                }
</script>